<?php

/**
 * This is the model metadata class for table "receivables".
 */
class ReceivablesMetadata extends CARMDC
{
	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'receivables';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('relate_id', 'numerical', 'integerOnly'=>true),
			array('receiver, payer, worker_id', 'length', 'max'=>20),
			array('receiveable, received, money', 'length', 'max'=>10),
			array('status, object_type', 'length', 'max'=>50),
			array('create_time', 'safe'),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('id, receiver, payer, receiveable, received, status, object_type, create_time, relate_id, worker_id, money', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'id' => 'ID',
			'receiver' => '收款人',
			'payer' => '付款人',
			'receiveable' => '应收金额',
			'received' => '已收金额',
			'status' => 'Status',
			'object_type' => 'Object Type',
			'create_time' => '创建时间',
			'relate_id' => 'Relate',
			'worker_id' => 'Worker',
			'money' => 'Money',
		);
	}
}